
#############################
### Final models for SIPP ###
#############################

rm(list = ls())
gc()

library(ggplot2)
library(reshape2)
library(lmtest)
library(sandwich)
library(MASS)
library(plyr)
library(stargazer)
library(dplyr)
library(data.table)
library(gridExtra)
library(grid)
library(lfe)
library(boot)
library(lfe)
library(interflex)

# Set working directory to current folder
# setwd("")

# Load data
load("state_data.RData")



#################
### Figure 1  ###
#################

(plot <- (ggplot(data=state_data[  year >= 1995 ], aes(y=replacement_ratio1_yr, x=as.numeric(year)))
          + geom_boxplot(aes(group=year), fill="blue", outlier.colour="black", outlier.shape=16,
                         outlier.size=2, notch=T, size=0.3, notchwidth = 0.5, alpha=0.5)
          + stat_summary()
          + stat_summary(geom="line")
          + theme_bw()
          + ylab("Average UI replacement rate")
          + xlab("Year")
          + ylim(0.3,0.6)
          + theme(legend.position="bottom", panel.grid.minor = element_blank())
))



#################
### Table A.1 ###
#################

mod_corr_v1 <- felm(replacement_ratio1_yr ~ log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + 
                 log(real1exppc) + log(real1revpc) + log(disinc) + union_density + log(pop) + 
                 hs_dem_prop_all + govparty_a + pollib_median + median_duration_in_weeks | state_abbr + year | 0 | state_abbr, state_data)

summary(mod_corr_v1)

labels_mod_corr_v1 <- c("GSP (per-capita, log)","Change GSP","Unemployment rate",
                        "Expenditures (per-capita, log)","Revenues (per-capita, log)","Avg. disposable income (log)",
                        "Union density","Population (log)","Share Democrats in State House","Democrat as Governor",
                        "State Policy Liberalism Score","Median duration of unemployment")


stargazer(mod_corr_v1,
          digits.extra=0, digits=3, align=T, no.space=T, omit.stat=c("ser","F"), type="text",
          covariate.labels = labels_mod_corr_v1, dep.var.labels = c("UI replacement rate"),
          label="tab:mod_corr_v1", column.sep.width = "-10pt",
          title="Correlates of State-level Unemployment Insurance Replacement Rates",
          add.lines = list(c("Mean DV", round(mean(mod_corr_v1$fitted.values),3)),
                           c("State FE","$\\checkmark$"),
                           c("Year FE","$\\checkmark$")))




##################
### Figure A.1 ###
##################

(plot <- (ggplot(data=state_data[ year >= 1997 ], aes(y=replacement_ratio1_yr, x=as.numeric(year)))
          + geom_line()
          + facet_wrap(~ state_abbr)
          + theme_bw()
          + ylab("Average UI replacement rate")
          + xlab("Year")
          + ylim(0.29,0.61)
          + theme(legend.position="bottom", panel.grid.minor = element_blank(),
                  axis.text.x = element_text(angle=45, hjust = 1))
))



##################
### Figure A.2 ###
##################

(plot <- (ggplot(data=state_data[ year >= 1995 ], aes(y=ihs_max_benefit_cpi10, x=as.numeric(year)))
          + geom_line()
          + facet_wrap(~ state_abbr)
          + theme_bw()
          + ylab("UI maximum benefits (log)")
          + xlab("Year")
          + theme(legend.position="bottom", panel.grid.minor = element_blank(),
                  axis.text.x = element_text(angle=45, hjust = 1))
))



##################
### Figure A.3 ###
##################

(plot <- (ggplot(data=state_data[ year >= 1999 ], aes(y=debt_inc_ratio_low_yr, x=as.numeric(year)))
          + geom_line()
          + facet_wrap(~ state_abbr)
          + theme_bw()
          + ylab("Average household debt/income ratio")
          + xlab("Year")
          + theme(legend.position="bottom", panel.grid.minor = element_blank(),
                  axis.text.x = element_text(angle=45, hjust = 1))
))




#################
### Table A.2 ###
#################


state_data_na <- na.omit(state_data[ ,.(state_abbr,year,year_num,replacement_ratio1_yr,debt_inc_ratio_low_yr,real1gsppc,
                                        gsptotal_PC_pct_chg,unemploy_a,real1exppc,real1revpc,disinc,pollib_median,
                                        hs_dem_prop_all,govparty_a,median_duration_in_weeks,pop,union_density) ])

mod_abbr_v1 <- felm(debt_inc_ratio_low_yr ~ replacement_ratio1_yr  | state_abbr + year | 0 | state_abbr, state_data_na)
summary(mod_abbr_v1)

mod_abbr_v2 <- felm(debt_inc_ratio_low_yr ~ replacement_ratio1_yr + log(real1gsppc) + gsptotal_PC_pct_chg + log(disinc) + 
                      unemploy_a + median_duration_in_weeks + log(real1exppc) + log(real1revpc) | state_abbr + year | 0 | state_abbr, state_data_na)
summary(mod_abbr_v2)

mod_abbr_v4 <- felm(debt_inc_ratio_low_yr ~ replacement_ratio1_yr + log(real1gsppc) + gsptotal_PC_pct_chg + log(disinc) + 
                      unemploy_a + median_duration_in_weeks + log(real1exppc) + log(real1revpc) + 
                      hs_dem_prop_all + govparty_a + union_density + pollib_median | state_abbr + year | 0 | state_abbr, state_data_na)
summary(mod_abbr_v4)

mod_abbr_v5 <- felm(debt_inc_ratio_low_yr ~ replacement_ratio1_yr + log(real1gsppc) + gsptotal_PC_pct_chg + log(disinc) + 
                      unemploy_a + median_duration_in_weeks + union_density + log(real1exppc) + log(real1revpc) + 
                     hs_dem_prop_all + govparty_a + union_density + pollib_median + year_num + I(year_num^2) | state_abbr | 0 | state_abbr, state_data_na)
summary(mod_abbr_v5)


### Bootstrap 
mod_abbr_v1_formula <- paste(mod_abbr_v1$call)[2]
mod_abbr_v2_formula <- paste(mod_abbr_v2$call)[2]
mod_abbr_v4_formula <- paste(mod_abbr_v4$call)[2]
mod_abbr_v5_formula <- paste(mod_abbr_v5$call)[2]

mod_abbr_v1_fun <- function(data,b,formula){
  d <- data[b,] # b is the random indexes for the bootstrap sample
  return(eval(parse(text=paste("felm(",mod_abbr_v1_formula,",d)$coefficients")))) # for the beta coefficient
}

mod_abbr_v2_fun <- function(data,b,formula){
  d <- data[b,] # b is the random indexes for the bootstrap sample
  return(eval(parse(text=paste("felm(",mod_abbr_v2_formula,",d)$coefficients")))) # for the beta coefficient
}

mod_abbr_v4_fun <- function(data,b,formula){
  d <- data[b,] # b is the random indexes for the bootstrap sample
  return(eval(parse(text=paste("felm(",mod_abbr_v4_formula,",d)$coefficients")))) # for the beta coefficient
}

mod_abbr_v5_fun <- function(data,b,formula){
  d <- data[b,] # b is the random indexes for the bootstrap sample
  return(eval(parse(text=paste("felm(",mod_abbr_v5_formula,",d)$coefficients")))) # for the beta coefficient
}


set.seed(02138)
boot_mod_abbr_v1 <- boot(data=state_data_na, statistic=mod_abbr_v1_fun, R=1000, strata = as.factor(state_data_na$state_abbr), parallel = "multicore")
set.seed(02138)
boot_mod_abbr_v2 <- boot(data=state_data_na, statistic=mod_abbr_v2_fun, R=1000, strata = as.factor(state_data_na$state_abbr), parallel = "multicore")
set.seed(02138)
boot_mod_abbr_v4 <- boot(data=state_data_na, statistic=mod_abbr_v4_fun, R=1000, strata = as.factor(state_data_na$state_abbr), parallel = "multicore")
set.seed(02138)
boot_mod_abbr_v5 <- boot(data=state_data_na, statistic=mod_abbr_v5_fun, R=1000, strata = as.factor(state_data_na$state_abbr), parallel = "multicore")

gc()

labels_mod_abbr_v1x <- c("UI replacement rate","GSP (per-capita, log)","Change GSP","Avg. disposable income (log)",
                         "Unemployment rate","Median duration of unemployment",
                         "Expenditures (per-capita, log)","Revenues (per-capita, log)",
                         "Share Democrats in State House","Democrat as Governor","Union density","State Policy Liberalism Score")


stargazer(mod_abbr_v1, mod_abbr_v2, mod_abbr_v4, mod_abbr_v5,
          se = list(apply(boot_mod_abbr_v1$t,2,sd), apply(boot_mod_abbr_v2$t,2,sd), 
                    apply(boot_mod_abbr_v4$t,2,sd), apply(boot_mod_abbr_v5$t,2,sd)), # bootstrapped SE
          digits.extra=0, digits=2, align=T, no.space=T, omit.stat=c("ser","F"), type="latex",
          covariate.labels = labels_mod_abbr_v1x, dep.var.labels = "Debt/Income Ratio",
          omit = c("year","I\\(year\\^2","factor"),
          title="Marginal Effects of UI Replacement Rate on Debt/Income Ratio",
          add.lines = list(c("Mean DV",
                             round(mean(mod_abbr_v1$fitted.values),2), round(mean(mod_abbr_v2$fitted.values),2),
                             round(mean(mod_abbr_v4$fitted.values),2), round(mean(mod_abbr_v5$fitted.values),2)),
                           c("State FE","Y","Y","Y","Y"),
                           c("Year FE","Y","Y","Y","-"),
                           c("Year trends (linear + quadr.)","-","-","-","Y")))



########################
### Tables 1 and A.3 ###
########################

# Load data
load("sipp_data.RData")

### Max benefits
sipp_mod_v4.1 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*ihs_max_benefit_cpi10 + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings
                      | pid + year | 0 | pid , sipp_data[  ])
summary(sipp_mod_v4.1) 

sipp_mod_v4.2 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*ihs_max_benefit_cpi10 + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) 
                      | pid + year | 0 | pid , sipp_data[  ])
summary(sipp_mod_v4.2) 


sipp_mod_v4.3 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*ihs_max_benefit_cpi10 + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) + 
                        govparty_a + hs_dem_prop_all + union_density + pollib_median + median_duration_in_weeks | pid + year | 0 | pid , sipp_data[])
summary(sipp_mod_v4.3) 


sipp_mod_v4.4 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*ihs_max_benefit_cpi10 + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) + 
                        govparty_a + hs_dem_prop_all + union_density + pollib_median + median_duration_in_weeks + 
                        year_num*factor(abbr) | pid + year | 0 | pid, sipp_data[])
summary(sipp_mod_v4.4) 


### Replacement rate
sipp_mod_v5.1 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings
                      | pid + year | 0 | pid , sipp_data[  ])
summary(sipp_mod_v5.1) 

sipp_mod_v5.2 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) 
                      | pid + year | 0 | pid , sipp_data[  ])
summary(sipp_mod_v5.2) 


sipp_mod_v5.3 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) + 
                        govparty_a + hs_dem_prop_all + union_density + pollib_median + median_duration_in_weeks | pid + year | 0 | pid , sipp_data[])
summary(sipp_mod_v5.3) 


sipp_mod_v5.4 <- felm(ihs_rhhuscbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) + 
                        govparty_a + hs_dem_prop_all + union_density + pollib_median + median_duration_in_weeks + 
                        year_num*factor(abbr) | pid + year | 0 | pid , sipp_data[])
summary(sipp_mod_v5.4) 


### Table 1
labels_sipp_mod_v4_5_sub <- c("UI recipient","UI replacement rate","Maximum UI benefits (log)",
                              "UI recipient $\\times$ UI replacement rate","UI recipient $\\times$ Maximum UI benefits (log)")

stargazer(sipp_mod_v5.1, sipp_mod_v5.3, sipp_mod_v5.4, sipp_mod_v4.1, sipp_mod_v4.3, sipp_mod_v4.4,
          se = list(sipp_mod_v5.1$cse, sipp_mod_v5.3$cse, sipp_mod_v5.4$cse, 
                    sipp_mod_v4.1$cse, sipp_mod_v4.3$cse, sipp_mod_v4.4$cse), 
          omit=c("factor","year_num"), digits.extra=0, digits=2, 
          align=T, no.space=T, omit.stat=c("ser","F"), type="text",
          covariate.labels = labels_sipp_mod_v4_5_sub, dep.var.labels = "Total unsecured household debt (log)",
          title="Marginal Effects of Unemployment on Unsecured Debt by Unemployment Insurance Benefit Generosity",
          keep = c("unemp_recipient","ihs_max_benefit_cpi10","replacement_ratio1_yr"),
          add.lines = list(c("Mean DV",
                             round(mean(sipp_mod_v5.1$fitted.values),2), round(mean(sipp_mod_v5.3$fitted.values),2), round(mean(sipp_mod_v5.4$fitted.values),2),
                             round(mean(sipp_mod_v4.1$fitted.values),2), round(mean(sipp_mod_v4.3$fitted.values),2), round(mean(sipp_mod_v4.4$fitted.values),2)),
                           c("Household FE","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$"),
                           c("Year FE","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$"),
                           c("State-year trends","$-$","$-$","$\\checkmark$","$-$","$-$","$\\checkmark$"),
                           c("Household-level Controls","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$"),
                           c("State-level Controls","$-$","$\\checkmark$","$\\checkmark$","$-$","$\\checkmark$","$\\checkmark$")))


### Table A.3
labels_sipp_mod_v4_5_fin <- c("UI recipient","UI replacement rate","Maximum UI benefits (log)",
                              "Income Q2","Income Q3","Income Q4","Income Q5",
                              "Education: some college","Education: college","Education: BA","Education: MA","Age","Age square",
                              "Number of children","Married","Single","Renter","White","Asian","Black","Savings (log)",
                              "GSP (per-capita, log)","Change GSP","Unemployment rate", "Expenditures (per-capita, log)","Revenues (per-capita, log)",
                              "Avg. disposable income (log)",
                              "Democrat as governor", "Share Democrats in house","Union density","State policy liberalism","Median duration of unemployment",
                              "UI recipient $\\times$ UI replacement rate","UI recipient $\\times$ Maximum UI benefits (log)")

stargazer(sipp_mod_v5.1, sipp_mod_v5.3, sipp_mod_v5.4, sipp_mod_v4.1, sipp_mod_v4.3, sipp_mod_v4.4,
          se = list(sipp_mod_v5.1$cse, sipp_mod_v5.3$cse, sipp_mod_v5.4$cse, 
                    sipp_mod_v4.1$cse, sipp_mod_v4.3$cse, sipp_mod_v4.4$cse), 
          omit=c("factor","year_num"), digits.extra=0, digits=2, 
          align=T, no.space=T, omit.stat=c("ser","F"), type="text",
          covariate.labels = labels_sipp_mod_v4_5_fin, dep.var.labels = "Total unsecured household debt (log)",
          title="Marginal Effects of Unemployment on Unsecured Debt by Unemployment Insurance Benefit Generosity",
          add.lines = list(c("Mean DV",
                             round(mean(sipp_mod_v5.1$fitted.values),2), round(mean(sipp_mod_v5.3$fitted.values),2), round(mean(sipp_mod_v5.4$fitted.values),2),
                             round(mean(sipp_mod_v4.1$fitted.values),2), round(mean(sipp_mod_v4.3$fitted.values),2), round(mean(sipp_mod_v4.4$fitted.values),2)),
                           c("Household FE","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$"),
                           c("Year FE","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$","$\\checkmark$"),
                           c("State-year trends","$-$","$-$","$\\checkmark$","$-$","$-$","$\\checkmark$")))



##################
### Figure 2a) ###
##################

sipp_mod_v4_bin_v3 <- interflex(Y = "ihs_rhhuscbt_cpi10_adj", D = "unemp_recipient", X = "ihs_max_benefit_cpi10", 
                                 Z = c("thtotinc_swave_quint","educ_v3","age","age_sq", "rfnkids","hh_type_v2_num","ownership_num","erace_v2_num","ihs_savings",
                                       "real1gsppc_log", "gsptotal_PC_pct_chg", "unemploy_a", "real1exppc_log", "real1revpc_log","disinc_log",
                                       "govparty_a", "hs_dem_prop_all","median_duration_in_weeks", "union_density", "pollib_median"), 
                                 estimator = "binning", data = sipp_data, FE = c("pid","year"), na.rm=T, vartype = "robust", cl="pid")

(plot_sipp_mod_v4_bin_v3 <- plot(sipp_mod_v4_bin_v3, 
                                 ylab = c("Marginal effect of UI recipiency\non unsecured debt (log)\n "),
                                 xlab = c("             Maximum UI Benefits (log)"),  Xdistr = "density", bin.labs = T,
                                 cex.lab = 0.8, cex.axis = 0.7))


##################
### Figure 2b) ###
##################

sipp_mod_v5_bin_v3 <- interflex(Y = "ihs_rhhuscbt_cpi10_adj", D = "unemp_recipient", X = "replacement_ratio1_yr", 
                                 Z = c("thtotinc_swave_quint","educ_v3","age","age_sq", "rfnkids","hh_type_v2_num","ownership_num","erace_v2_num","ihs_savings",
                                       "real1gsppc_log", "gsptotal_PC_pct_chg", "unemploy_a", "real1exppc_log", "real1revpc_log","disinc_log",
                                       "govparty_a", "hs_dem_prop_all","median_duration_in_weeks", "union_density", "pollib_median"), 
                                 estimator = "binning", data = sipp_data, FE = c("pid","year"), na.rm=T, vartype = "robust", cl="pid")

(plot_sipp_mod_v5_bin_v3 <- plot(sipp_mod_v5_bin_v3, 
                                 ylab = c("Marginal effect of UI recipiency\non unsecured debt (log)\n "),
                                 xlab = c("             Average UI replacement rate"),  Xdistr = "density", bin.labs = T,
                                 cex.lab = 0.8, cex.axis = 0.7))


################
### Table A4 ###
################

sipp_mod_v6.1 <- felm(ihs_thhscdbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings
                      | pid + year | 0 | pid , sipp_data[  ])
summary(sipp_mod_v6.1) 

sipp_mod_v6.2 <- felm(ihs_thhscdbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc)
                      | pid + year | 0 | pid , sipp_data[  ])
summary(sipp_mod_v6.2) 


sipp_mod_v6.3 <- felm(ihs_thhscdbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) + 
                        govparty_a + hs_dem_prop_all + union_density + pollib_median + median_duration_in_weeks | pid + year | 0 | pid , sipp_data[])
summary(sipp_mod_v6.3) 

sipp_mod_v6.4 <- felm(ihs_thhscdbt_cpi10_adj ~ unemp_recipient*replacement_ratio1_yr + thtotinc_swave_quint + 
                        educ_v3 + age + I(age^2) + rfnkids + hh_type_v2 + ownership + erace_v2 + ihs_savings + 
                        log(real1gsppc) + gsptotal_PC_pct_chg + unemploy_a + log(real1exppc) + log(real1revpc) + log(disinc) + 
                        govparty_a + hs_dem_prop_all + union_density + pollib_median + median_duration_in_weeks + 
                        year_num*factor(abbr) | pid + year | 0 | pid , sipp_data[])
summary(sipp_mod_v6.4) 


labels_sipp_mod_v6_new <- c("UI recipient","UI replacement rate", "Income Q2","Income Q3","Income Q4","Income Q5",
                            "Education: some college","Education: college","Education: BA","Education: MA","Age","Age square",
                            "Number of children","Married","Single","Renter","White","Asian","Black","Savings (log)",
                            "GSP (per-capita, log)","Change GSP","Unemployment rate", "Expenditures (per-capita, log)","Revenues (per-capita, log)",
                            "Avg. disposable income (log)", "Democrat as governor", "Share Democrats in house","Union density","State policy liberalism",
                            "Median duration of unemployment","UI recipient $\\times$ UI replacement rate")

stargazer(sipp_mod_v6.1,sipp_mod_v6.3, sipp_mod_v6.4,
          se = list(sipp_mod_v6.1$cse, sipp_mod_v6.3$cse, sipp_mod_v6.4$cse), 
          omit=c("factor","year_num"), digits.extra=0, digits=2, 
          align=T, no.space=T, omit.stat=c("ser","F"), type="text",
          covariate.labels = labels_sipp_mod_v6_new, dep.var.labels = "Total secured household debt (log)",
          title="Marginal Effects of Unemployment on Secured Debt by Unemployment Insurance Benefit Generosity",
          add.lines = list(c("Mean DV", round(mean(sipp_mod_v6.1$fitted.values),2), round(mean(sipp_mod_v6.3$fitted.values),2), round(mean(sipp_mod_v6.4$fitted.values),2)),
                           c("Household FE","$\\checkmark$","$\\checkmark$","$\\checkmark$"),
                           c("Year FE","$\\checkmark$","$\\checkmark$","$\\checkmark$"),
                           c("State-year trends","$-$","$-$","$\\checkmark$")))


